package com.litianhao.community.dao;

import com.litianhao.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @author litianhao
 * @create 2020-03-14 14:58
 */
@Mapper
public interface UserMapper {

    //根据id查询
    User selectById(int id);

    //根据姓名查询
    User selectByName(String username);

    //根据邮箱查询
    User selectByEmail(String email);

    //插入用户
    int insertUser(User user);

    //更新状态
    int updateStatus(int id,int status);

    //更新头像
    int updateHeader(int id,String headerUrl);

    //更改密码
    int updatePassword(int id,String password);
}
